<div id="accordion">
	<div>
		<h3><a href="#" id="buttonLink">Fast add menu</a></h3>
		<div id="buttonMenu">
			<center>
				<%= link_to_function("<span class='ui-icon ui-icon-plus'></span>New computer", :class => 'ui-state-default ui-corner-all dialog_link fastForm_link') do |page|
					page.hide "remote_company"
					page.hide "remote_room"
					page.hide "remote_network"
					page.hide "remote_operation"
					page.hide "show"
					page.show "remote_computer"
				end%>&nbsp;
				<%= link_to_function("<span class='ui-icon ui-icon-plus'></span>New company", :class => 'ui-state-default ui-corner-all dialog_link fastForm_link') do |page|
					page.hide "remote_computer"
					page.hide "remote_room"
					page.hide "remote_network"
					page.hide "remote_operation"
					page.hide "show"
					page.show "remote_company"
				end%>&nbsp;
				<%= link_to_function("<span class='ui-icon ui-icon-plus'></span>New room", :class => 'ui-state-default ui-corner-all dialog_link fastForm_link') do |page|
					page.hide "remote_computer"
					page.hide "remote_company"
					page.hide "remote_network"
					page.hide "remote_operation"
					page.hide "show"
					page.show "remote_room"
				end%>&nbsp;
				<%= link_to_function("<span class='ui-icon ui-icon-plus'></span>New network", :class => 'ui-state-default ui-corner-all dialog_link fastForm_link') do |page|
					page.hide "remote_computer"
					page.hide "remote_company"
					page.hide "remote_room"
					page.hide "remote_operation"
					page.hide "show"
					page.show "remote_network"
				end%>&nbsp;
				<%= link_to_function("<span class='ui-icon ui-icon-plus'></span>New operation", :class => 'ui-state-default ui-corner-all dialog_link fastForm_link') do |page|
					page.hide "remote_computer"
					page.hide "remote_company"
					page.hide "remote_room"
					page.hide "remote_network"
					page.hide "show"
					page.show "remote_operation"
				end%>&nbsp;
			</center>
		</div>
	</div>
</div>
<div id="fastform_dialog">
	<div id="remote_computer" class="ui-widget-content ui-corner ui-corner-all fastForm" style="display: none;">
		<% remote_form_for :computer, :url => {:action => 'create', :controller => 'computers'},
		 :complete => "$('remote_computer').hide();$('fastform_dialog').hide();" do |f| %>
	  		<%= render :partial => 'computers/new', :locals => {:f => f}%>
		<% end -%>
	</div>
	<div id="remote_company" class="ui-widget-content ui-corner ui-corner-all fastForm" style="display: none;">
		<% remote_form_for :company, :url => {:action => 'create', :controller => 'companies'},
		 :complete => "$('remote_company').hide();$('fastform_dialog').hide();" do |f| %>
	  		<%= render :partial => 'companies/new', :locals => {:f => f}%>
		<% end -%>
	</div>
	<div id="remote_room" class="ui-widget-content ui-corner ui-corner-all fastForm" style="display: none;">
		<% remote_form_for :room, :url => {:action => 'create', :controller => 'rooms'},
		 :complete => "$('remote_room').hide();$('fastform_dialog').hide();" do |f| %>
	  		<%= render :partial => 'rooms/new', :locals => {:f => f}%>
		<% end -%>
	</div>
	<div id="remote_network" class="ui-widget-content ui-corner ui-corner-all fastForm" style="display: none;">
		<% remote_form_for :room, :url => {:action => 'create', :controller => 'networks'},
		 :complete => "$('remote_network').hide();$('fastform_dialog').hide();" do |f| %>
	  		<%= render :partial => 'networks/new', :locals => {:f => f, :computers => @allComputers}%>
		<% end -%>
	</div>
	<div id="remote_operation" class="ui-widget-content ui-corner ui-corner-all fastForm" style="display: none;">
		<% remote_form_for :operation, :url => {:action => 'create', :controller => 'operations'},
		 :complete => "$('remote_operation').hide();$('fastform_dialog').hide();" do |f| %>
	  		<%= render :partial => 'operations/new', :locals => {:f => f}%>
		<% end -%>
	</div>
	<div id="show" style="display: none;"></div>
</div>
<div id="addOperationForm" class="ui-widget-content ui-corner ui-corner-all fastForm" style="display: none;"></div>
<%= periodically_call_remote(:url => {:action => "update_tabs"}, :frequency => 300 )%>
<div id="tabs">
	<ul>
		<li><a href="#tabs-1">Dashboard</a></li>
		<li><a href="#tabs-2">Graphics</a></li>
	</ul>
	<div id="tabs-1">
		<%= render :partial => 'supervisions/tree', :locals => {:companies => @companies}%>
	</div>
	<div id="tabs-2">
		<h2>Operations</h2>
		<div id="operation_graph"><%= render :partial => 'supervisions/operation_report', :locals => {:operation_counts_date => @operation_counts_date, :operation_counts_status => @operation_counts_status}%></div>
		<h2>Computers</h2>
		<div id="computer_graph"><%= render :partial => 'supervisions/computer_report', :locals => {:computers_counts => @computers_counts}%></div>
		<h2>Operating systems</h2>
		<div id="os_graph"><%= render :partial => 'supervisions/os_report', :locals => {:computer_os_counts => @computer_os_counts}%></div>
	</div>
</div>